<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
<link rel="stylesheet" href="/Geolocation/WebContent/css/jquery-ui.css"/>  
<link rel="stylesheet" href="/Geolocation/WebContent/css/button.css" />  
<link rel="stylesheet" href="/Geolocation/WebContent/css/primeui-1.0-min.css" />
<link rel="stylesheet" href="/Geolocation/WebContent/css/theme.css" />    
<script type="text/javascript" src="/Geolocation/WebContent/js/jquery-2.1.0.js"></script>  
<script type="text/javascript" src="/Geolocation/WebContent/js/jquery-ui.js"></script>  
<script type="text/javascript" src="/Geolocation/WebContent/js/primeui-1.0-min.js"></script> 
<script type="text/javascript" src="/Geolocation/WebContent/js/button.js"></script> 
<head>
<title>Coordinates</title>
</head>
<body>
<p id="demo">Click the button to get your coordinates:</p>
<button onclick="getLocation()">Try It</button>
<button onclick ="#{UsuarioBean.cadastrarUsuario()}"
 value="Salvar"> Enviar </button>
 <button id="default" type="button">Default</button>
<p:commandButton action="#{marcaBean.cadastrarMarca()}"
value="Salvar" update=":formConteudo" />
<script>
var x=document.getElementById("demo");
function getLocation()
  {
  if (navigator.geolocation)
    {
    navigator.geolocation.getCurrentPosition(showPosition);
    }
  else{x.innerHTML="Geolocation is not supported by this browser.";}
  }
function showPosition(position)
  {
  x.innerHTML="Latitude: " + position.coords.latitude + 
    "<br/>Longitude: " + position.coords.longitude;
   }
</script>
</body>
</html>